/**
 * Created by xie on 2018/3/13.
 */
angular.module('module.knowledge')
    .controller('KnowledgeController', KnowledgeController);

KnowledgeController.$inject = ['$scope','$state','$cookieStore','$rootScope','KnowledgeService'];

function KnowledgeController($scope, $state,$cookieStore, $rootScope,KnowledgeService) {
    var vm = this;
    vm.goDetails = goDetails;

    function goDetails(plant){

        $state.go("plantknowledge",{plantid:plant.plantid});
    }

    vm.aa = [
        "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png",
       "images/imggg/maimengxiaojin.png"


    ]

    KnowledgeService.getPlantAll().$promise.then(function(data){
        vm.plantlist = data;
    },function(err){
        console.log(err)
    });

}